import axios from 'axios'

const http = axios.create({
    baseURL: "http://localhost:8080/",
    timeout: 1000,
})

export function get(url, params = {}) {
    return new Promise((resolve, reject) => {
        http({
            url,
            method: "get",
            params
        }).then(res => {
            resolve(res)
        }).catch(err => {
            reject(err)
        })
    })
}